import request from "@/utils/request";

//获取下拉选项数据
export function overallOptions(data) {
  return request({
    baseURL: window.APP_GETEWAY.dexh,
    url: "/export_config/option",
    method: "get",
    data,
  });
}

// 获取业务日志
export const getBusinessLog = (params) =>
  request({
    baseURL: window.APP_GETEWAY.dexh,
    url: "/log/business",
    method: "get",
    params,
  });
  export const getBusinessLogList = (params) =>
  request({
    url: "/business-log/index",
    method: "get",
    params,
  });
// 字典列表
export const getDictList = (params) =>
  request({
    url: "/dict/index",
    method: "get",
    params,
  });

// 平台站点
export function getPlatform() {
  return request({
    baseURL: window.APP_GETEWAY.base,
    url: "/v1/platform/tree",
    method: "get",
  });
}
// 员工
export function personnel(params) {
  return request({
    baseURL: window.APP_GETEWAY.auth,
    url: "/tenant/organization",
    method: "get",
    params,
  }).then((res) => res.data);
}


// 部门
export function department(params) {
  return request({
    baseURL: window.APP_GETEWAY.auth,
    url: "/department",
    method: "get",
    params,
  }).then((res) => res.data);
}

// 获取分类列表
export function classify(params) {
  return request({
    baseURL: window.APP_GETEWAY.goods,
    url: "/base/backend-classification/get-list",
    method: "get",
    params,
  }).then((res) => res.data);
}

// 店铺列表
export const getShop = (data) =>
  request({
    baseURL: window.APP_GETEWAY.base,
    url: "/v1/shop/drop-list",
    method: "post",
    data,
  });

  // 站店列表
export const getSites = (params) =>
request({
  baseURL: window.APP_GETEWAY.base,
  url: "/v1/platform/sites",
  method: "get",
  params,
});

//文件上传message
export const uploadFlieMsg = (data) =>
  request({
    baseURL: window.APP_GETEWAY.message,
    url: "/message/storage/signature/upload",
    method: "post",
    data,
  });
  //文件下载message
export const downFlieMsg = (params) =>
request({
  baseURL: window.APP_GETEWAY.message,
  url: "/message/storage/signUrl",
  method: "get",
  params,
});

